/**
\file LoSetupapi.h
*/
#pragma once
#include <lostlbase.h>
#include "System.h"
#include "LoDll.h"
#include <Setupapi.h>

namespace lo {

	class Setupapi : public dll
	{
	public:
		Setupapi() : dll("setupapi") {}
		void *InitializeFileLog(const char *logFile) const;
		bool setupFindNextLine( INFCONTEXT &infcIn, INFCONTEXT &infcOut );
		bool SetupGetInfInformation( __in LPCVOID InfSpec, __in DWORD SearchControl, auto_ptr<SP_INF_INFORMATION> & ReturnBuffer );
		bool SetupGetSourceFileLocation( __in HINF infHandle, __in const char *fileName, __inout PUINT sourceId, __inout string &returns, __in PINFCONTEXT infContext = nullptr );
		bool SetupGetTargetPath( __in HINF infHandle, __in const char *section, __inout string &returns, __in PINFCONTEXT infContext = nullptr );
		bool setupInstallFileEx( __in HINF InfHandle, __in PINFCONTEXT InfContext, __in const char *sourceFile, __in const char *sourcePathRoot,
			__in const char *destinationName, __in DWORD copyStyle, __in PSP_FILE_CALLBACK copyMsgHandler, __in PVOID Context, __out PBOOL FileWasInUse );

	};

}
